home *** CD-ROM | disk | FTP | other *** search
/ An Invitation to the Roland World of Music / Roland - An Invitation To The Roland World Of Music.bin / vb / msgblast / readme.txt < prev    next >
Text File  |  1994-08-31  |  8KB  |  210 lines

  1. 8/31/94
  2. Message Blaster v2.2
  3. Fixed a problem with WM_DESTROY. It seems that VB reverses the message order
  4. and destroys the parent window and then the children of the parent. Anyhow,
  5. I was processing WM_DESTROY when I shouldn't have been. 
  6.  
  7.  
  8. 8/18/94
  9. Message Blaster v2.1b
  10. Again, a minor bug fix. When a control was re-subclassed, I wasn't saving 
  11. the target hwnd.
  12.  
  13.  
  14. 5/23/94
  15. Message Blaster v2.1
  16. Minor bug fix. Had a problem with deleting user defined messages in 
  17. the message center. Got an internet account. Should make it easier to 
  18. get ahold of me. 
  19. My new internet address is: edstaff@mcs.com
  20.  
  21.  
  22. 4/23/94
  23.  
  24. Message Blaster v2.0
  25.  
  26. Wow,  lot's of improvements! Let see ... perhaps the biggest thing is 
  27. that the only code you have to write any more is in the message event. 
  28. I added a new property called the message center. It is vastly easier 
  29. to use than the original. As a matter of fact, to use it requires NO 
  30. code to set up. The only thing you have to do is respond to the message 
  31. event!
  32.  
  33. How?
  34.  
  35. I've added a new property called the MsgCenter. When you double-click 
  36. on this property it will bring up a dialog that will allow you to choose 
  37. which control you want to catch messages for, what messages you want to 
  38. catch, and how you want to process them. The cool part is that you don't 
  39. have to choose the target hWnd at run time (Although,   you still can if 
  40. you need to... this thing is 100% backward compatible). All of the original 
  41. functionality is still there, the only change is to the UI.
  42.  
  43. Miscellaneous new features.
  44. I added top and left properties so you can move the thing to where you want
  45. it at design time and it will stay there. Before, you would put it on the 
  46. form someplace and the next time you brought it up it "magically" moved to 
  47. the upper left corner.
  48.  
  49. I added a version stamp resource for those of you who need to keep 
  50. track of that.
  51.  
  52. For those of you who have never used it, I have included a winword doc
  53. that is the original text of the MSDN ariticle that explains the ins and 
  54. outs. 
  55.  
  56. Also in the zip file you will find several examples of how to use the 
  57. message blaster. These include a simple method for tying menus and status
  58. bars together so you can display messages as the user moves thru menus;
  59. a method for effectively creating a custom cursor in VB; and finally a 
  60. method for creating a small caption bar in VB. Good stuff. And you can't 
  61. beat the price.
  62.  
  63. Also, I recently left Microsoft to start my own business. Therefore, this 
  64. new version is longer free. It is shareware with a suggested price of $25. 
  65. Check the about box property of the details. Hey, it's only 25 bucks for 
  66. something I worked a lot on, so if you want to see more, let me know your 
  67. using it and appreciate it! For your 2000 bits, I'll send you the source 
  68. and you'll get free upgrades from here on out. Also, I am working on a OLE 
  69. control version of it, to be coming to a theater new you.
  70.  
  71. I will be happy to provide as much tech support as I have time for. However,
  72. you should understand that this control and it's use, assumes you have 
  73. knowledge of the underlying architecture of windows. If you don't understand
  74. Window's messaging, I don't have the time to explain it.
  75.  
  76. Lastly, I build these things because I thing they are fun to build. 
  77. If you have an idea for a control that you think would be a winner, drop 
  78. me a line or give me a call.
  79.  
  80. Oh yeah, one other thing, Bugs. While there are no know bugs in the vbx at
  81. this time, you never know. If you find one, let me know so I can fix it. 
  82. This thing has been in use by many, many programmers for a long time, so it's
  83. pretty stable. I am proud to say that it ships as part of a number of 
  84. Microsoft products!
  85.  
  86. Ed Staffin
  87. 758 N. Williams Drive
  88. Palatine, IL 60067
  89. phone 708-358-0484
  90.  
  91.  
  92. Later ... Ed
  93.  
  94. Message Blaster
  95. v. 1.1
  96.  
  97. Ok, here is the second release of my message blaster custom control for
  98. VB2. The primary differences are several bug fixes and a new message event 
  99. parameter. One other new feature is that you can now change the target 
  100. object at run time by merely setting the hWndTarget property.
  101.  
  102. What is it? Well, it's a control that will allow the VB programmer to catch
  103. and process Windows messages directly from within VB. This is accomplished
  104. by placing a message blaster on your form and specifying the object you
  105. want to catch messages for and what messages to catch. The message blaster
  106. should be able to catch just about any message for any control or form. You
  107. can catch up to 25 messages per target object. I suppose, if you needed to
  108. catch more than that, you could use 2 blasters and point them at the same
  109. object, but the idea of catching 25+ messages seems remote to me.
  110.  
  111. Normally, you would specify the target controls and what messages to catch
  112. in the form load section of your form. For example:
  113.  
  114. Sub Form_Load ()
  115.     Const PREPROCESS = -1
  116.     Const EATMESSAGE = 0
  117.     Const POSTPROCESS = 1
  118.     
  119.     MsgBlaster1.hWndTarget = text1.hWnd
  120.     MsgBlaster1.MsgList(0) = WM_NCHITTEST
  121.  
  122.     MsgBlaster2.hWndTarget = text2.hWnd
  123.     MsgBlaster2.MsgList(0) = WM_LBUTTONDOWN
  124.     MsgBlaster2.MsgPassage(0) = EATMESSAGE
  125.     MsgBlaster2.MsgList(1) = WM_RBUTTONDOWN
  126.     
  127.  
  128.     MsgBlaster3.hWndTarget = example.hWnd
  129.     MsgBlaster3.MsgList(0) = WM_MENUSELECT
  130.  
  131. End Sub
  132.  
  133.  
  134. Now, when you run your application, the Message Blaster will monitor the
  135. message stream for your targeted controls. When it finds a message that
  136. you are interested in it will fire an event as follows:
  137.  
  138. Sub MsgBlaster1_Message (MsgVal As Integer, wParam As Integer, lParam As Long, ReturnVal As Long)
  139.  
  140.     ' Do your message processing here
  141.  
  142.     MsgBox "Just got a WM_NCHITTEST"
  143.     
  144.     ' Do some processing to see where you hit and then return the appropriate
  145.     ' value to windows
  146.     
  147.     ReturnVal = HT_BORDER
  148.  
  149. End Sub
  150.  
  151. When dealing with windows messages there may be times when you would not
  152. want to pass the message you catch on to VB. This is why I provide a
  153. property array called MsgPassage. This property allows you to specify how
  154. you want the message blaster to handle target messages. PREPROCESS means
  155. that the message will be passed on to VB prior to the Message Blaster's
  156. message event is fired. EATMESSAGE is just what is suggests, the Message
  157. Blaster eats the message and fires the message event. POSTPROCESS, which is
  158. the default, means that the Message Blaster fires the message event first,
  159. then passes the message on to VB.
  160.  
  161. There is only a couple of messages that I know of that I can't
  162. catch...WM_CREATE and WM_NCCREATE. This is because The target control is
  163. already existant when you tell the message blaster about it.
  164.  
  165. I suppose I should put in a caution here. This is, in some ways, subverting
  166. VB. Because of this, the user of this control should be careful how they use
  167. this control. I have found that if VB is already providing support for
  168. certain messages (i.e. click, keypress etc.) don't use my control to catch
  169. them. Although it will work just fine, you may, on certain messages not
  170. always get the results you would expect.
  171.  
  172. Here are some of the things that I have heard that people want to use this
  173. for:
  174.  
  175. 1. Catching WM_MENUINIT and WM_MENUSELECT messages so they can change status
  176. bars as the user moves through menus.
  177.  
  178. 2. Catching WM_NCHITTEST for all kinds of things.
  179.  
  180. 3. Catching WM_DROPFILE
  181.  
  182. 4. Catching DDE stuff.
  183.  
  184. 5. Catching WAV file stuff
  185.  
  186. And I'm sure you'll find more.
  187.  
  188. I am including a file called Messages.txt that contains most of the Windows
  189. Messages defined in VB format (i.e. Global Const WM_MENUSELECT = &H11F).
  190.  
  191. There is also and example program that illustrates the use of the Message
  192. Blaster.                 
  193.  
  194. A new example, created by Jim Cash and Randall Kern, show how to use the msgblaster to create 
  195. small captioned window, similar to that of the toolbox in vb. Check it out
  196. it's cool!
  197.  
  198. Please let me know if there are any bugs. Also, if you have any ideas for
  199. improvement let me know. I would be very interested in hearing how you use
  200. this control.
  201.  
  202. Oh, by the way, check out the about box, it's good for my head.
  203.  
  204. I would like to thank chrisfr who helped me find a nasty bug that was 
  205. keeping me up at night.                                               
  206.  
  207. Also, thanks to Jimc and t-randyk for a nice improvement to the program.
  208.  
  209. Enjoy it!
  210.